<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<title>分公司表</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../res/css/layui.css"  media="all">
<link rel="stylesheet" href="../../res/css/sh/snBranch.css"  media="all">
<script type="text/javascript" src="../../res/js/jquery-1.11.2.min.js"></script>
</head>
<body>
<from class="layui-form"  >
 <div class="demoTable" style="margin-left:20px;margin-top: 10px;">
  分公司名
 <div class="layui-inline">
			<input class="layui-input" style="height: 32px;" id="braName"
				autocomplete="off">
		</div>
		
状态:
		
		<div class="layui-inline">
			<select lay-filter="aihao" id="sort">
				style="width: 100px; border: 1px solid red;">
				<option value="">====请选择====</option>
				<option value="1">等待提交审核</option>
				<option value="2">审核中</option>
				<option value="3">审核通过</option>
			</select>
		</div>
		</from>
  <button class="layui-btn layui-btn-sm" data-type="reload" id="selectButton">搜索</button>
  <button class="layui-btn layui-btn-warm layui-btn-sm" id="add">增加</button>

</div>
 
<table class="layui-table" lay-data="{ url:'../../branch/selectAll.action', page:true, id:'idTest'}" lay-filter="demo">
  <thead>
    <tr>
      <th lay-data="{type:'checkbox', fixed: 'left'}"></th>
      <!--  <th lay-data="{field:'userId', align:'center',templet:'#imgTpls'}">用户ID</th>-->
      <th lay-data="{field:'braName', align:'center',templet:'#imgTpls',width:'150'}">分公司名称</th>
      <th lay-data="{field:'braSite', align:'center',width:'130'}">分公司地址</th>
      <th lay-data="{field:'braExplain', align:'center',width:'200'}">分公司说明</th>
      <th lay-data="{field:'sort', align:'center',templet:'#imgTpl',width:'140'}">审核是否通过</th>
      <th lay-data="{field:'optime', align:'center',width:'130'}">操作时间</th>
      <th lay-data="{field:'oper', align:'center',width:'130'}">操作人</th>
      <th lay-data="{fixed: 'right', align:'center', toolbar: '#barDemo',width:'190'}">操作</th>
    </tr>
  </thead>
</table>



<script type="text/javascript" id="imgTpl">
{{# if(d.sort == 1) { }}
<div>等待提交审核</div>
{{# }else if(d.sort == 2) { }}
<div>审核中</div>
{{# }else if(d.sort == 3) { }}
<div>审核通过</div>
{{# }}}
</script>

<script type="text/html" id="barDemo">
	{{# if(d.sort == 1) { }}
     <button class="layui-btn layui-btn-xs" lay-event="edit">编辑</button>
	 <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>
 	{{# } else{ }}
     <button class="layui-btn layui-btn-disabled layui-btn-xs">编辑</button>
	 <button class="layui-btn layui-btn-disabled layui-btn-xs">删除</button>
	{{# }}}
 {{# if(d.sort == 1) { }}
     <button class="layui-btn layui-btn-xs layui-btn-warm" lay-event="audit">提交审核</button>
 {{# }else if(d.sort == 2){ }}
	<button class="layui-btn layui-btn-xs layui-btn-disabled">等待审核</button>
 {{# }else{ }}
	<button class="layui-btn layui-btn-xs layui-btn-disabled">审核通过</button>
 {{# }}}
</script>
           
<!-- 增加或修改的弹框 -->
<div id="addOrUpdate" style="display: none;">
	<form id="myform" class="layui-form"  method="post" action="<%=basePath %>SiteServlet?action=submit" style="margin-top: 20px;" >
		<input type="hidden" name="braId" id="braId"/>
	    
	   <div class="aru">
	    <label class="layui-form-label">分公司名称:</label>
	    <div class="layui-input-block">
	        <input name="braName" id="braName" class="layui-input" type="text"  >
	    </div>
	  </div>
	  
	   <div class="aru">
	    <label class="layui-form-label">分公司地址:</label>
	    <div class="layui-input-block">
	     <input name="braSite" id="braSite" class="layui-input" type="text"  >
	    </div>
	  </div>
	  
	   <div class="aru">
	    <label class="layui-form-label">分公司说明:</label>
	    <div class="layui-input-block">
	     <input name="braExplain" id="braExplain" class="layui-input" type="text"  >
	    </div>
	  </div>
	
	 <!-- 
		<div class="aru">
	    <label class="layui-form-label">审核是否通过:</label>
	    <div class="layui-input-block">
	      <select name="isva" lay-filter="aihao" id="isva" style="width:100px;border: 1px solid red;">
	        <option value=""></option>
	        <option value="1">是</option>
	        <option value="2">否</option>
	      </select>
	    </div>
	  </div>
	  -->
 
 	  
	  
	  <div class="aru">
	    <div class="layui-input-block">
	      <input type="button" class="layui-btn" id="sub" value="确认提交"/>
	      <a href="javascript:exit();" class="layui-btn layui-btn-danger">关闭</a>
	    </div>
	  </div>
	</form>
</div>    
          
<script src="../../res/layui.all.js" charset="utf-8"></script>
<script type="text/javascript" src="../../res/js/sh/snBranch.js"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
</body>
</html>